<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>AdminLTE 2 | Dashboard</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.5 -->
    <link rel="stylesheet" href="../components/AdminLTE/bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
    <link rel="stylesheet" href="../components/AdminLTE/dist/css/skins/_all-skins.min.css">


    <!-- iCheck -->
    <link rel="stylesheet" href="../components/AdminLTE/plugins/iCheck/flat/blue.css">
    <!-- iCheck for checkboxes and radio inputs -->
    <link rel="stylesheet" href="../components/AdminLTE/plugins/iCheck/all.css">

    <link rel="stylesheet" href="../components/AdminLTE/plugins/select2/select2.css">

    <!-- DataTables -->
    <link rel="stylesheet" href="../components/AdminLTE/plugins/datatables/dataTables.bootstrap.css">


    <!-- Theme style -->
    <link rel="stylesheet" href="../components/AdminLTE/dist/css/AdminLTE.min.css">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->

</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

    <header class="main-header">
        <!-- Logo -->
        <a href="index2.html" class="logo">
            <!-- mini logo for sidebar mini 50x50 pixels -->
            <span class="logo-mini"><b>A</b>LT</span>
            <!-- logo for regular state and mobile devices -->
            <span class="logo-lg"><b>Admin</b>LTE</span>
        </a>
        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top" role="navigation">
            <!-- Sidebar toggle button-->
            <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                <span class="sr-only">Toggle navigation</span>
            </a>

        </nav>
    </header>
    <!-- Left side column. contains the logo and sidebar -->
    <aside class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
            <ul class="sidebar-menu">
                <li class="header">MAIN NAVIGATION</li>
            </ul>
        </section>
        <!-- /.sidebar -->
    </aside>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                Dashboard
                <small>Control panel</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
                <li class="active">Dashboard</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">

                <section class="col-md-12">

                    <div class="box box-info">
                        <div class="box-header with-border">
                            <h3 class="box-title">添加优惠券</h3>
                        </div>
                        <!-- /.box-header -->
                        <!-- form start -->
                        <form class="form-horizontal">
                            <div class="box-body">


                                <div class="form-group">
                                    <label class="col-sm-2 control-label">适用范围</label>
                                    <div class="J-type col-sm-10">
                                        <select name="type" id="J-proType" class="form-control" required>
                                            <option value="1">全场通用</option>
                                            <option selected value="2">商品</option>
                                            <option value="3">分类</option>
                                            <option value="4">店铺</option>
                                            <option value="5">品牌</option>
                                        </select>
                                    </div>
                                </div>



                                <div class="J-selWrap hide form-group">
                                    <label class="J-label col-sm-2 control-label">适用范围</label>
                                    <div class="J-type col-sm-10">

                                        <select name="" data-type="3" data-selected="3,504,506" class="J-sel2 form-control select2 select2-hidden-accessible-" multiple data-placeholder="请选择"></select>

                                    </div>
                                </div>
                                <input id="selectResult" class="sr-only" value="1345,1347" type="text" name="goods">

                                <div class="J-resultList hide- form-group">
                                    <label class="col-sm-2 control-label">选择商品</label>
                                    <div class="col-sm-10">
                                        <div class="add-goods">
                                            <button type="button" class="form-control" data-toggle="modal" data-target="#GoodsModal">请选择商品</button>
                                        </div>
                                        <div class="goods-list hide-">
                                            <table class="table table-bordered">

                                                <thead>
                                                <tr>
                                                    <th style="width: 50px">ID</th>
                                                    <th style="width: 50px">货号</th>
                                                    <th>名称</th>
                                                    <th style="width: 150px">分类</th>
                                                    <th style="width: 80px">价格</th>
                                                    <th style="width: 80px">库存</th>
                                                    <th style="width: 80px">类型</th>
                                                    <th style="width: 80px">审核状态</th>
                                                    <th style="width: 80px">上下架</th>
                                                </tr>
                                                </thead>
                                                <tbody>
                                                <tr id="selGoods-1345" class="J-tr" data-id="1345">

                                                    <td>1345</td>
                                                    <td>GS0001</td>
                                                    <td>
                                                        <a class="J-linkG" href="/goods/1345?proview=1" target="_blank">古龙水</a>
                                                    </td>
                                                    <td>中性香水</td>
                                                    <td>999.00</td>
                                                    <td>102</td>
                                                    <td>一般商品</td>
                                                    <td>
                                                        <div class="label label-success">审核通过</div>
                                                    </td>
                                                    <td>
                                                        <div class="label label-warning">下架</div>
                                                    </td>
                                                </tr>
                                                <tr id="selGoods-1347" class="J-tr" data-id="1347">

                                                    <td>1347</td>
                                                    <td>1111</td>
                                                    <td>
                                                        <a class="J-linkG" href="/goods/1347?proview=1" target="_blank">测试前台商品显示</a>
                                                    </td>
                                                    <td>女士香水</td>
                                                    <td>11.00</td>
                                                    <td>11</td>
                                                    <td>一般商品</td>
                                                    <td>
                                                        <div class="label label-success">审核通过</div>
                                                    </td>
                                                    <td>
                                                        <div class="label label-success">上架</div>
                                                    </td>
                                                </tr>
                                                </tbody>
                                            </table>
                                        </div>

                                    </div>
                                </div>




                            </div>
                            <!-- /.box-body -->

                            <div class="box-footer">
                                <button type="button" class="btn btn-default">取消</button>
                                <button type="submit" class="J-submit btn btn-info pull-right">确定</button>
                            </div>
                            <!-- /.box-footer -->


                        </form>

                        <div class="J-onLoading overlay hide">
                            <i class="fa fa-refresh fa-spin"></i>
                        </div>
                    </div>


                </section>

            </div>
            <!-- /.row (main row) -->

        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->



    <footer class="main-footer">
        <div class="pull-right hidden-xs">
            <b>Version</b> 2.3.2
        </div>
        <strong>Copyright &copy; 2014-2015 <a href="http://almsaeedstudio.com">Almsaeed Studio</a>.</strong> All rights
        reserved.
    </footer>

</div>
<!-- ./wrapper -->

<div id="GoodsModal" class="modal fade">
    <div class="modal-dialog  modal-lg">
        <div class="modal-content box">

            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">选择商品</h4>
            </div>


            <div class="modal-body">
                <form class="J-search form-search form-inline" action="/admin/goods/1" method="get" >

                    <div class="form-group">
                        <label class="sr-only">商品分类</label>
                        <select name="cat_id" class="J-select form-control select2 select2-hidden-accessible" data-placeholder="请选择">
                            <option></option>
                            <option value="1">美妆个护</option>
                            <option value="2">进口美食</option>
                            <option value="3">服饰鞋包</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label class="sr-only">品牌</label>
                        <select name="brand_id" class="J-select form-control select2 select2-hidden-accessible" data-placeholder="请选择">
                            <option></option>
                            <option value="1">阿芙妮</option>
                            <option value="2">纳爱斯</option>
                            <option value="3">绿萝</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label class="sr-only">类型</label>
                        <select name="type" class="form-control">
                            <option value="">选择类型</option>
                            <option value="0">一般商品</option>
                            <option value="1">E贸易商品</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label class="sr-only">审核状态</label>
                        <select name="audit_status" class="form-control ">
                            <option value="">所有审核状态</option>
                            <option value="0">未审核</option>
                            <option value="1">审核通过</option>
                            <option value="2">审核不通过</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label class="sr-only">上下架</label>
                        <select name="is_on_sale" class="form-control">
                            <option value="">所有上下架</option>
                            <option value="1">上架</option>
                            <option value="2">下架</option>
                        </select>
                    </div>

                    <div class="form-group">
                        <label class="sr-only">商品名称</label>
                        <input type="text" name="goods_name" class="form-control" placeholder="请输入商品名称">
                    </div>

                    <div class="form-group">
                        <label class="sr-only">商品编码</label>
                        <input type="text" name="goods_sn" class="form-control" placeholder="请输入商品编码">
                    </div>

                    <button type="submit" class="J-searchBtn btn btn-primary">搜索</button>


                </form>

                <div class="box-body table-responsive" style="padding: 30px 0 0 0;">

                    <table class="table table-hover">
                        <thead>
                        <tr>
                            <th class="text-center" style="width: 60px">选择</th>
                            <th style="width: 50px">ID</th>
                            <th style="width: 50px">货号</th>
                            <th>名称</th>
                            <th style="width: 150px">分类</th>
                            <th style="width: 80px">价格</th>
                            <th style="width: 80px">库存</th>
                            <th style="width: 80px">类型</th>
                            <th style="width: 80px">审核状态</th>
                            <th style="width: 80px">上下架</th>
                        </tr>
                        </thead>
                        <tbody class="J-goodsList"></tbody>

                    </table>
                </div>
                <div class="box-footer">
                    <!-- 分页 -->
                    <div class="J-page pull-right no-margin-pager">
                        <ul class="pagination"></ul>
                    </div>


                </div>
            </div>


            <div class="J-footer modal-footer hide">
                <div class="J-result content text-left" style="min-height: 50px;"></div>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="J-ok btn btn-primary">确定</button>
            </div>

            <div class="J-loading overlay">
                <i class="fa fa-refresh fa-spin"></i>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<template id="goodsTrTpl">
    <tr id="goods-list-tr${goods_id}" class="J-tr" data-id="${goods_id}">
        <td class="checkbox-wrap text-center">
            <input class="J-check" type="checkbox" value="${goods_id}" ${is_checked}>
        </td>
        <td>${goods_id}</td>
        <td>${goods_sn}</td>
        <td>
            <a class="J-linkG" href="/goods/${goods_id}?proview=1" target="_blank">${goods_name}</a>
        </td>
        <td>${cat_name}</td>
        <td>${shop_price}</td>
        <td>${goods_number}</td>
        <td>${type}</td>
        <td>
            <div class="label label-${audit_class}">${audit_status}</div>
        </td>
        <td>
            <div class="label label-${sale_class}">${is_on_sale}</div>
        </td>
    </tr>
</template>

<!-- jQuery 2.1.4 -->
<script src="../components/AdminLTE/plugins/jQuery/jQuery-2.1.4.min.js"></script>
<!-- Bootstrap 3.3.5 -->
<script src="../components/AdminLTE/bootstrap/js/bootstrap.min.js"></script>

<script src="../components/AdminLTE/plugins/select2/select2.min.js"></script>

<!-- AdminLTE App -->
<script src="../components/AdminLTE/dist/js/app.min.js"></script>


<script src="../js/tools.js"></script>
<script src="../js/searchGoods.js"></script>
</body>
</html>
